<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function Car(name,speed){
            this.name=name;
            this.speed =speed;
            this.showName=function(){
                console.log(this.name)
            }
            Car.prototype.showName=function(){
                console.log(this.name);
            }
        }
        var car=new Car("奥迪",300);
        var car2=new Car("奔驰",200);
        console.dir(car);
        console.dir(car2);
        // car.showName();
    </script>
</head>
<body>
    
</body>
</html>